package HomeWork2;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Scanner;

public class Datecount {
    public static void main(String[] args) throws ParseException {
        System.out.println ("输入五个人的出生日期 格式：xxxx年xx月xx日");

        SimpleDateFormat s = new SimpleDateFormat("yyyy年MM月dd日");
        Date nowDate = new Date();


        List<String>mylist = new ArrayList <> (  );
        for (int i = 0; i <5 ; i++) {
            Scanner sc = new Scanner ( System.in );
            String date = sc.next ();
            mylist.add ( date );
            //Date birth = s.parse (date);
        }

        for (String i:
                mylist) {
            //String old = s.format (s.parse (i));
            long birth = s.parse (i).getTime ();
            long now = nowDate.getTime ();
            System.out.println ("来自这个世界"+(now-birth));
        }
    }
}